package org.itboys.log;

import com.alibaba.fastjson.JSON;
import org.itboys.framework.spring.controller.BaseController;
import org.itboys.fuzion.entity.IncomeExpenditureRecords;
import org.itboys.fuzion.service.IncomeExpenditureRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 数据库的日志记录
 * Created by weisky on 2016/5/12.
 */
@RestController
@RequestMapping("/log")
public class LogController extends BaseController {

    @Autowired
    private IncomeExpenditureRecordsService incomeExpenditureRecordsService;

    /**
     * 收支明细的日志记录
     * @param incomeExpenditureRecords
     */
    public void incomeExpenditureRecordsLog(IncomeExpenditureRecords incomeExpenditureRecords){
        logger.info("LogController.incomeExpenditureRecordsLog:远程调用收支明细记录，IncomeExpenditureRecords：" + JSON.toJSONString(incomeExpenditureRecords));
        incomeExpenditureRecordsService.insert(incomeExpenditureRecords);
    }


}
